package com.cee.quartz.job;

import com.cee.enums.BaseEnum;
import com.cee.util.EnumUtil;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public enum EnableIndEnum implements BaseEnum<String> {
    Y("Y", "Yes"), N("N", "No");

    private String code;
    private String text;

    private EnableIndEnum(String code, String text) {
        this.code = code;
        this.text = text;
    }

    @Override
    public String getCode() {
        return code;
    }

    @JsonValue
    @Override
    public String getText() {
        return text;
    }

    @JsonCreator
    public static EnableIndEnum createEnum(String code) {
        return EnumUtil.getEnumByCode(EnableIndEnum.class, code);
    }
}
